import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {ValidateProvider} from "../../providers/validate/validate";

@IonicPage({
    segment: 'member/wallet/recharge/result'
})
@Component({
    selector: 'page-money-recharge-result',
    templateUrl: 'money-recharge-result.html',
})
export class MoneyRechargeResultPage {

    constructor(
        public navCtrl: NavController,
        public navParams: NavParams,
        public validate:ValidateProvider
    ) {
        if (!this.validate.checkLogin()) {
            this.navCtrl.push('LoginPage');
        }
    }

    //判断用户是否登录
    ionViewCanEnter(){
        return this.validate.checkLogin();
    }

    finish() {
        this.navCtrl.setRoot('MemberPage');
        this.navCtrl.popToRoot({
            animate: true,
            direction: 'forward'
        });
    }

}
